#include "region.h"


using namespace std;


map<unsigned int, shared_ptr<Region>> Region::colorMap;
map<string,       shared_ptr<Region>> Region::idMap;


void Region::add(shared_ptr<Region> region)
{
	colorMap[region->color] = region;
	   idMap[region->id]    = region;
}


shared_ptr<Region> Region::get(string id)
{
	return idMap[id];
}


shared_ptr<Region> Region::get(unsigned int color)
{
	return colorMap[color];
}
